package com.heima.user.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.LoginDto;
import com.heima.user.service.IApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/login")
@Api(tags = "app端登录")
public class LoginController {

    @Autowired
    private IApUserService apUserService;


    @PostMapping(value = "/login_auth",name = "app端登录")
    @ApiOperation(value = "login_auth",notes = "app端登录")
    @ApiImplicitParam(name="dto",dataType = "LoginDto" ,required=true)
    public ResponseResult login_auth(@RequestBody LoginDto dto){
        return apUserService.login(dto);
    }
}
